package com.ad_hccm.dao.Appendix;

import com.ad_hccm.domain.Appendix.AE;
import com.ad_hccm.domain.Appendix.CompletionStatus;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * TODO 临床试验完成情况
 */
@Mapper
public interface CompletionStatusDao {
    @Insert("insert into completion_status value(#{id}, #{isCompletionExperiment}, #{type}, #{isEliminate}, #{isExit}, #{isSuspendExperiment}, #{date})")
    public boolean save(CompletionStatus domain);

    @Update("update completion_status set isCompletionExperiment = #{isCompletionExperiment}, type = #{type}, isEliminate = #{isEliminate}, isExit = #{isExit}, isSuspendExperiment = #{isSuspendExperiment}, date = #{date} where id=#{id}")
    public boolean update(CompletionStatus domain);

    @Select("select * from completion_status where id=#{id}")
    public CompletionStatus getById(String id);

    @Select("select * from completion_status")
    public List<CompletionStatus> getAll();

    @Delete("delete from completion_status where id=#{id}")
    public boolean delete(String id);
}